package br.com.imob.model;

import java.text.DecimalFormat;

import org.apache.solr.client.solrj.beans.Field;

public class ImobItem {
		
	@Field
	private String id;
	
	@Field
	private String code;
	
	@Field
	private String neighbor;
	
	@Field("priceImob")
	private Float price;

	@Field
	private String thumbnail;
	
	@Field
	private String link;
	
	@Field
	private String imob;	
	
	@Field
	private String goal;
	
	@Field("_version_")
	private Long version;

	
	
	public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}


	public String getCode() {
		return code;
	}


	public void setCode(String code) {
		this.code = code;
	}


	public String getNeighbor() {
		return neighbor;
	}


	public void setNeighbor(String neighbor) {
		this.neighbor = neighbor;
	}


	public Float getPrice() {
		return price;
	}


	public void setPrice(Float price) {
		this.price = price;
	}


	public String getThumbnail() {
		return thumbnail;
	}


	public void setThumbnail(String thumbnail) {
		this.thumbnail = thumbnail;
	}


	public String getLink() {
		return link;
	}


	public void setLink(String link) {
		this.link = link;
	}


	public String getImob() {
		return imob;
	}


	public void setImob(String imob) {
		this.imob = imob;
	}


	public String getGoal() {
		return goal;
	}


	public void setGoal(String goal) {
		this.goal = goal;
	}


	public Long getVersion() {
		return version;
	}


	public void setVersion(Long version) {
		this.version = version;
	}
	
	@Override
	public String toString(){
		DecimalFormat df = new DecimalFormat("#.##");
		StringBuilder str = new StringBuilder();
		str.append( "\t" + this.code );
		str.append( "\t" + this.neighbor );
		str.append( "\t" + df.format(this.price) );
		str.append( "\t" + this.goal );
		
		return str.toString();
	}
}
